package com.skp.plastory;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {

	TextView mMainText;
	Button mBtnTest;
	Button mBtnStoryList;
	Button mBtnStoryWrite;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		mMainText = (TextView) findViewById(R.id.mainText);
		mBtnTest = (Button) findViewById(R.id.btn_list_test);
		mBtnStoryList = (Button) findViewById(R.id.btn_list_story);
		mBtnStoryWrite = (Button) findViewById(R.id.btn_write_story);

		mMainText.setText("Plastory");

		mBtnTest.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(getApplicationContext(), ListTest.class);
				startActivity(i);
			}
		});

		mBtnStoryList.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent i = new Intent(getApplicationContext(), ListStory.class);
				startActivity(i);
			}
		});

		mBtnStoryWrite.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent i = new Intent(getApplicationContext(), WriteStory.class);
				startActivity(i);
			}
		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

}
